
<div id="header">
	<a href='<?php echo site_url('main/')?>'>
		<img src="<?php print ASSETS_URL?>images/logo.png" class="left"/>
	</a>
	<div class="head-right right right-text">
		<div class="header-text top-menu-container bmargin">
			<a href="<?php echo site_url('main/page/delivery_view');?>" class="top-menu-item dark-grey"><?=lang('delivery_label')?></a>|
			<a href="<?php echo site_url('main/page/returns_view');?>" class="top-menu-item dark-grey"><?=lang('returns_label')?></a>|
			<a href="<?php echo site_url('main/page/about_us_view');?>" class="top-menu-item dark-grey"><?=lang('about_us_label')?></a>|
			<a href="<?php echo site_url('contact');?>" class="top-menu-item dark-grey"><?=lang('contact_us_label')?></a>|
			<a href="<?php echo site_url('main/page/help');?>" class="top-menu-item dark-grey"><?=lang('help_label')?></a>|
			<?php
				if (!$access->isLoggedIn()) {
					?>
					<a href="javascript:void(0)" id="loginBtn" class="top-menu-item dark-grey"><?=lang('login')?></a>
					<?php
				}
				elseif (!$access->getAdmin()) {
					?>
					<a href="<?php echo site_url('user/my_account')?>" class="top-menu-item dark-grey"><?=lang('my_account')?></a>
					<?php
				} else {
					?>
					<a href="<?php echo site_url('user/logout')?>" class="top-menu-item dark-grey"><?=lang('logout')?></a>
					<?php
				}
			?>
			
		</div>
		<div class="right marginLeft90">
			<?php 
			if ( $this->cart->total_items()) {
				$total_head =  $this->cart->total_items();
			} else {
				$total_head =  '0' ;
			}
			$total_head = $total_head .' '. lang('items_text');
			?>
			<input type="text" name="search" autocomplete="off" id="cart-small-header-input" value="<?php echo $total_head; ?>" class="bmargin button-search cart-icon right cursor-pionter" />
			<div class="clear"></div>
			<input type="text" name="search" id="search" value="<?php echo (isset($search['search']) ? $search['search']: lang('search_text'))?>" class="bmargin button-search magnifier-icon right" />
		</div>
		<div class="tool-container right">
			
			<div class="right">
				<select class="dropdownSelector" id="currencySelector">
				<?php
					foreach ($currencies as $currency) {
						if ($sel_currency == $currency->name) {
							echo '<option selected value="' . $currency->name .  '">' . strtoupper($currency->name) . '</option>';
						} 
						else {
							echo '<option value="' . $currency->name .  '">' . strtoupper($currency->name) . '</option>';
						}
					}
				?>
				</select>				
			</div>
			<div class="light-grey language-bar-cont">
				
				<div class="rmargin-s right dark-grey">  <?php echo lang('currency_select')?> </div>
				<div class="clear"></div>
			</div>
			
			<div class="clear"></div>
			
			<div class="right">
				<select class="dropdownSelector" id="languageSelector">
				<?php
					foreach ($languages as $language) {
						$swicthUri =  base_url() . $langObject->switch_uri($language->key);
						$flagUrl = IMAGES_URL . 'flags/' . $language->key . '.png';
						if ($langObject->lang() == $language->key) {
							echo '<option selected value="' . $swicthUri .  '" lang_id="' . $language->id . '">' . ucfirst($language->name) . '</option>';
						} 
						else {
							echo '<option value="' . $swicthUri .  '" lang_id="' . $language->id . '">' . ucfirst($language->name) . '</option>';
						}
					}
				?>
				</select>				
			</div>
				<div class="light-grey language-bar-cont">
				
				<div class="rmargin-es right dark-grey"> <?php echo lang('language_select')?> </div>
				<div class="clear"></div>
			</div>
			
			<div class="clear"></div>
			<div class="right">
			
				<select class="dropdownSelector" id="countrySelector">
				<?php
					foreach ($countries as $country) {
						$flagUrl = IMAGES_URL . 'flags/' . $country->flag;
						if ($sel_country == $country->id) {
							echo '<option selected value="' . $country->id .  '" title="' . $flagUrl . '">' . ucfirst($country->name) . '</option>';
						} 
						else {
							echo '<option value="' . $country->id .  '" title="' . $flagUrl . '">' . ucfirst($country->name) . '</option>';
						}
					}
				?>
				</select>				
			</div>
			<div class="light-grey language-bar-cont">
				
				<div class="rmargin-s right dark-grey"> <?php echo lang('shipping_to')?> </div>
				<div class="clear"></div>
			</div>
		</div>
		<div class="clear"></div>
		<div>			
			<div class="right top-contact">
				<span class="item"><b>PHONE:</b> <?php echo $this->config->item('office_phone');?></span>
				<span class="item"><b>EMAIL:</b> <?php echo $this->config->item('office_email_address');?></span>
				<span id="chat" class="item hand"><b>CHAT</b>
					<img src="<?php print ASSETS_URL?>images/chat-balloon.png" class="lmargin-s"/>
				</span>
			</div>
		</div>
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
</div>
<!--
<select name='salesRepEmployeeNumber' class='chosen-select' data-placeholder='Nyelv'>
	<option value=''></option>
	<option value='hu'><a href="<?php echo base_url() ?>hu">magyar</a> </option>
</select>
-->